package com.cyam.base;

import java.util.List;
import java.util.Map;
import com.cyam.util.Pager;
/**
 * 公共服务
 * @author CourageAQ
 *
 * @param <T>
 */
public abstract interface IBaseService<T> {
	
	/**保存*/
	public abstract void save(T t) throws Exception; 
	
	/**更新*/
	public abstract void update(T t)  throws Exception;
	
	/**删除*/
	public abstract void remove(int id) throws Exception;
	
	/**查询*/
	public abstract List<T> findAll(Map<String, Object> map) throws Exception;
	
	/**查询单个*/
	public abstract T findOne(Map<String, Object> map) throws Exception;
	
	/**分页查询*/
	public abstract Pager findPager(Map<String, Object> map, int page, int size) throws Exception;

	/**只分页，不查数据*/
	public Pager countPager(Map<String, Object> map,int page, int size) throws Exception;
}
